#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>

int main()
{
    pid_t pid = fork();
    if (pid < 0)
    {
        fprintf(stderr, "fork error!\n");
        exit(-1);
    }
    else if (pid == 0)
    {
        /*子进程*/
        printf("%d : child is running.\n", getpid());
        exit(120);
    }
    else
    {
        /*父进程*/
        pid_t k;
        k = fork();
        if (k < 0)
        {
            fprintf(stderr, "fork error!\n");
            exit(-1);
        }
        if (k < 0)
        {
            /*子进程*/
            
        }
        else
        {
            /*父进程*/
        }
        return 0;
    }
}